home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / ASTVariableDeclaration.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  1.5 KB  |  50 lines  |  [TEXT/KAHL]

  1. /* ASTVariableDeclaration.h */
  2.  
  3. #ifndef Included_ASTVariableDeclaration_h
  4. #define Included_ASTVariableDeclaration_h
  5.  
  6. /* ASTVariableDeclaration module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* ASTExpression */
  12. /* SymbolTableEntry */
  13. /* TrashTracker */
  14. /* Memory */
  15. /* PcodeObject */
  16. /* CompilerRoot */
  17. /* PromotableTypeCheck */
  18.  
  19. #include "PcodeObject.h"
  20. #include "CompilerRoot.h"
  21.  
  22. struct ASTVarDeclRec;
  23. typedef struct ASTVarDeclRec ASTVarDeclRec;
  24.  
  25. /* all memory allocated in this module is through TrashTracker */
  26.  
  27. /* forwards */
  28. struct TrashTrackRec;
  29. struct SymbolRec;
  30. struct ASTExpressionRec;
  31.  
  32. /* allocate a new variable declaration.  if the Initializer expression is NIL, then */
  33. /* the object is initialized to NIL or zero when it enters scope. */
  34. ASTVarDeclRec*            NewVariableDeclaration(struct SymbolRec* SymbolTableEntry,
  35.                                             struct ASTExpressionRec* Initializer,
  36.                                             struct TrashTrackRec* TrashTracker, long LineNumber);
  37.  
  38. /* type check the variable declaration node.  this returns eCompileNoError if */
  39. /* everything is ok, and the appropriate type in *ResultingDataType. */
  40. CompileErrors                TypeCheckVariableDeclaration(DataTypes* ResultingDataType,
  41.                                             ASTVarDeclRec* VariableDeclaration, long* ErrorLineNumber,
  42.                                             struct TrashTrackRec* TrashTracker);
  43.  
  44. /* generate code for a variable declaration. returns True if successful, or */
  45. /* False if it fails. */
  46. MyBoolean                        CodeGenVarDecl(struct PcodeRec* FuncCode,
  47.                                             long* StackDepthParam, ASTVarDeclRec* VariableDeclaration);
  48.  
  49. #endif
  50.